package com.ynny.chapter14.service;

import com.ynny.chapter14.bean.User;
import com.ynny.chapter14.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceimpl implements UserService{

    @Autowired
    UserMapper UserMapper;
    @Override
    public List<User> selectAll() {

        return UserMapper.selectAll();
    }

    @Override
    public User selectIdAndNameAndPassword(int id, String name, String password) {
        return UserMapper.selectIdAndNameAndPassword(id,name,password);
    }
}
